package com.bizfty.api.apimanager.models;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;

/**
 *
 * @author johns
 */
@DiscriminatorValue("S")
public class DataTypeString extends DataType {
    /**
     * 默认字符串
     */
    @Column(name = "DEFAULT_STRING", nullable = true, length = 255)
    private String defaultString;
    /**
     * 验证表达式
     */
    @Column(name = "PARTTERN", nullable = true, length = 255)
    private String parttern;
    /**
     * 最大长度
     */
    @Column(name = "MAX_LENGTH", precision = 5, scale = 0)
    private int maxLength;
    /**
     * 最小长度
     */
    @Column(name = "MIN_LENGTH", precision = 5, scale = 0)
    private int minLength;

    /**
     * 默认字符串
     * @return the defaultString
     */
    public String getDefaultString() {
        return defaultString;
    }

    /**
     * 默认字符串
     * @param defaultString the defaultString to set
     */
    public void setDefaultString(String defaultString) {
        this.defaultString = defaultString;
    }

    /**
     * 验证表达式
     * @return the parttern
     */
    public String getParttern() {
        return parttern;
    }

    /**
     * 验证表达式
     * @param parttern the parttern to set
     */
    public void setParttern(String parttern) {
        this.parttern = parttern;
    }

    /**
     * 最大长度
     * @return the maxLength
     */
    public int getMaxLength() {
        return maxLength;
    }

    /**
     * 最大长度
     * @param maxLength the maxLength to set
     */
    public void setMaxLength(int maxLength) {
        this.maxLength = maxLength;
    }

    /**
     * 最小长度
     * @return the minLength
     */
    public int getMinLength() {
        return minLength;
    }

    /**
     * 最小长度
     * @param minLength the minLength to set
     */
    public void setMinLength(int minLength) {
        this.minLength = minLength;
    }
}
